package com.atguigu.lease.common.exceptions;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

/**
 * projectName: com.atguigu.lease.common.exceptions
 *
 * @author: 赵伟风
 * description:
 */
@Data
public class LeaseException extends RuntimeException{

    private ResultCodeEnum resultCodeEnum;

    public LeaseException(ResultCodeEnum resultCodeEnum) {
        //将错误描述传递给异常的message属性
        super(resultCodeEnum.getMessage());
        this.resultCodeEnum = resultCodeEnum;
    }
}
